<p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Reads a record from a relative file, or a sequence of bytes from a binary file, into a variable.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">FileNumber:</span> Any integer expression that determines the file number.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Position:</span> For files opened in Random mode, <span class="T1">Position</span> is the number of the record that you want to read.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/>For files opened in Binary mode, <span class="T1">Position</span> is the byte position in the file where the reading starts.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/>If <span class="T1">Position</span> is omitted, the current position or the current data record of the file is used.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="11" xmlns:help="http://openoffice.org/2000/help"/>Variable: Name of the variable to be read. With the exception of object variables, you can use any variable type.</p>
<p class="PropText"><help:paragraphinfo state="U" number="14" xmlns:help="http://openoffice.org/2000/help"/>Dim iNumber As Integer</p>
<p class="PropText"><help:paragraphinfo state="U" number="15" xmlns:help="http://openoffice.org/2000/help"/>Dim sText As Variant REM Must be a variant</p>
<p class="PropText"><help:paragraphinfo state="U" number="16" xmlns:help="http://openoffice.org/2000/help"/>Dim aFile As String</p>
<p class="PropText"><help:paragraphinfo state="U" number="20" xmlns:help="http://openoffice.org/2000/help"/>Open aFile For Random As #iNumber Len=32</p>
<p class="PropText"><help:paragraphinfo state="U" number="21" xmlns:help="http://openoffice.org/2000/help"/>Seek #iNumber,1 <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/>REM Position at beginning</p>
<p class="PropText"><help:paragraphinfo state="U" number="22" xmlns:help="http://openoffice.org/2000/help"/>Put #iNumber,, "This is the first line of text" <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>REM Fill line with text</p>
<p class="PropText"><help:paragraphinfo state="U" number="23" xmlns:help="http://openoffice.org/2000/help"/>Put #iNumber,, "This is the second line of text"</p>
<p class="PropText"><help:paragraphinfo state="U" number="24" xmlns:help="http://openoffice.org/2000/help"/>Put #iNumber,, "This is the third line of text"</p>
<p class="PropText"><help:paragraphinfo state="U" number="31" xmlns:help="http://openoffice.org/2000/help"/>Open aFile For Random As #iNumber Len=32</p>
<p class="PropText"><help:paragraphinfo state="U" number="36" xmlns:help="http://openoffice.org/2000/help"/>Put #iNumber,20,"This is the text in record 20"</p>